package com.apache.tomcat;

import com.apache.database.db.IDao;
import com.apache.database.model.MethodParam;
import com.apache.ius.IusSqlTools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

//@Component
//@EnableScheduling
public class ScheduledPool {

    @Autowired
    private IDao iusPubDao;

   // @Scheduled(fixedRate = 90000)
    public void checkRun() {
        String sql = "SELECT 1 FROM DUAL";
        MethodParam params = new MethodParam("ByObjInfo", "", "", IusSqlTools.SPANCENAME);
        params.setParams("dyncSql", sql);
        iusPubDao.selectSingle(params);
    }
}